Project Reliability Engineering by Eyal Shahar

Project Reliability Engineering by Eyal Shahar

Author:Eyal Shahar
Language: eng
Format: epub
ISBN: 9781484250198
Publisher: Apress


Listing 5-14Instantiating an ArgumentParser object

Then it’s a matter of adding the various command-line options to the parser and finally parsing the command line. For example (Listing 5-15):#...

parser.add_argument('--interval', type=int,

dest='loop_interval')

parser.add_argument('--conf-file',

default=['config.yaml'],

nargs=1)

parser.add_argument('--fan-pin',

nargs=2,

type=int,

action='append')

parser.add_argument('-v', '--verbose',

action='store_true')

args = parser.parse_args()



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.